# coding=utf-8
# @Author: Yao
# @Desc: { 写作路由模块 }
# @Date: 2023-4-12 13:57
from fastapi import APIRouter

from routers.writing import writting_api

router = APIRouter()

router.add_api_route(
    '',
    writting_api.get_article,
    methods=['get'],
    summary='获取文章',
    description="通过文章id，获取文章"
)

router.add_api_route(
    '',
    writting_api.create_article,
    methods=['post'],
    summary='创建文章',
    description="提交写作所需的参数"
)

router.add_api_route(
    '/context',
    writting_api.get_context,
    methods=['get'],
    summary='获取上下文',
    description="通过文章id，获取上下文"
)

router.add_api_route(
    '/context',
    writting_api.create_context,
    methods=['post'],
    summary='创建上下文',
    description="提交对上下文的描述"
)
